package TransactionImplementation

import (
	"SPC/AbstractTransactions"
	"SPC/Model"
	"SPC/ModelImplementation"
)

type ChangeMailTransaction struct {
	AbstractTransactions.ChangeMethodTransaction
	itsAddress string
}

func NewChangeMailTransaction(empid int, address string) *ChangeMailTransaction{
	n := &ChangeMailTransaction{
		*AbstractTransactions.NewChangeMethodTransaction(empid),
		address,
	}
	n.ChangeMethodTransaction.GetMethod = n.GetMethod
	return n
}

func (c *ChangeMailTransaction)GetMethod()Model.PaymentMethod{
	return ModelImplementation.NewMailMethod(c.itsAddress)
}